From 5873f70310c716846dd017cd53d5ac2fa7e024e7 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 9 Feb 2012 06:06:26 -0800 Subject: [PATCH] amd iommu: Remove redundant checks from iommu emulation code path Signed-off-by: Wei Wang Committed-by: Keir Fraser --- xen/drivers/passthrough/amd/iommu_guest.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c index 337d72b268..e2daf0e52e 100644 --- a/xen/drivers/passthrough/amd/iommu_guest.c +++ b/xen/drivers/passthrough/amd/iommu_guest.c @@ -805,9 +805,6 @@ int guest_iommu_set_base(struct domain *d, uint64_t base) p2m_type_t t; struct guest_iommu *iommu = domain_iommu(d); - if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled ) - return 0; - if ( !iommu ) return -EACCES; @@ -896,9 +893,6 @@ void guest_iommu_destroy(struct domain *d) { struct guest_iommu *iommu; - if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled ) - return; - iommu = domain_iommu(d); if ( !iommu ) return; -- 2.30.2